<?php

$search_data = array(
				'name'        => 'search',
				'id'          => 'search',
				'value'       => '',
				'maxlength'   => '100',
				'size'        => '40'
);

//search box
echo '<div id="search_box">';
echo '<input id="search_text"/>';
//if logged in show the 'favorite list' button
if($username != ""){echo '<button id="btn_favorite_list">Favorite List</button>';}
echo '<br/>Fastfood <input type="checkbox" value="0" id="search_cb_fastfood"/>';
echo 'Vegetarian <input type="checkbox" value="0" id="search_cb_vegetarian"/>';
echo 'Take-Away <input type="checkbox" value="0" id="search_cb_takeaway"/>';
echo 'Alcohol <input type="checkbox" value="0" id="search_cb_alcohol"/><br/><hr/><br/>';
echo '<h1>Restaurant List</h1>';
echo '</div>';

echo '<div id="browse_restaurants_body">';



//this div will be the content-container for the specific restaurant selected
//echo '<div class="browse_restaurants_page"></div>';




//this div will be the content-container for the restaurant list
//echo '<div class="browse_restaurants_list">';
if(isset($query)){
	foreach($query->result() as $row)
	{
		echo '<div class="dynamic_restaurant_link" address="'.$row->address_street.','.$row->address_zipcode.','.$row->address_city.'" id="'.$row->name.'" id="'.$row->name.'" style="cursor: hand;">'.$row->name.'</div>';
		//$restaurant_names[] = $row->name;
	}
}
else
{
	foreach($data as $rest)
	{
		echo '<div class="dynamic_restaurant_link" address="'.$rest['address_street'].','.$rest['address_zipcode'].','.$rest['address_city'].'" id="'.$rest['name'].'" style="cursor: hand;">'.$rest['name'].'</div>';
	}
}
//echo '</div></div>';
echo '</div>';

?>


